<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="theme-color" content="#333">
    <title>Login</title>
    <link rel="shortcut icon" href="<%=path%>/assets/img/favicon-v=3.png">
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <link rel="stylesheet" href="<%=path%>/assets/css/preload.min.css">
    <link rel="stylesheet" href="<%=path%>/assets/css/plugins.min.css">
    <link rel="stylesheet" href="<%=path%>/assets/css/style.light-blue-500.min.css">
    <link rel="stylesheet" href="<%=path%>/assets/css/width-boxed.min.css" id="ms-boxed" disabled="">
    <!--[if lt IE 9]>
    <script src="<%=path%>/assets/js/html5shiv.min.js"></script>
    <script src="<%=path%>/assets/js/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="bg-full-page ms-hero-bg-dark ms-hero-img-airplane back-fixed">
    <div class="mw-500 absolute-center">
        <div class="card color-dark shadow-6dp animated fadeIn animation-delay-7">
            <div class="ms-hero-bg-primary ms-hero-img-mountain">
                <h2 class="text-center no-m pt-4 pb-4 color-white index-1">Login Form</h2>
            </div>
            <div class="card-block">
                <div class="tab-content">
                    <div role="tabpanel" class="tab-pane fade active show" id="ms-login-tab">
                        <form:form method="post" id="fm1" commandName="${commandName}" htmlEscape="true">
                            <form:errors path="*" id="msg" cssStyle="color: red;" cssClass="errors" element="div" htmlEscape="false" />
                            <input type="hidden" name="lt" value="${loginTicket}"/>
                            <input type="hidden" name="execution" value="${flowExecutionKey}"/>
                            <input type="hidden" name="_eventId" value="submit"/>
                            <fieldset>
                                <div class="form-group label-floating">
                                    <div class="input-group">
                                    <span class="input-group-addon">
                                      <i class="zmdi zmdi-account"></i>
                                    </span>
                                        <label class="control-label" for="username">Username</label>
                                        <form:input cssClass="required form-control" cssErrorClass="error" id="username"
                                                    size="25" tabindex="1" accesskey="${userNameAccessKey}"
                                                    path="username" autocomplete="off" htmlEscape="true"/>
                                    </div>
                                    <div class="form-group label-floating">
                                        <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="zmdi zmdi-lock"></i>
                                        </span>
                                            <label class="control-label" for="password">Password</label>
                                            <form:password cssClass="required form-control" cssErrorClass="error"
                                                           id="password" size="25" tabindex="2" path="password"
                                                           accesskey="${passwordAccessKey}" htmlEscape="true"
                                                           autocomplete="off"/>
                                        </div>
                                    </div>
                                    <div class="row mt-2">
                                        <div class="col-5">
                                            <div class="form-group mt-1">
                                                <div class="checkbox">
                                                    <label><input type="checkbox"> Remember </label>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-7">
                                            <input class="btn btn-raised btn-primary pull-right" name="submit"
                                                   accesskey="l"
                                                   value="<spring:message code="screen.welcome.button.login" />"
                                                   tabindex="6" type="submit"/>
                                        </div>
                                    </div>
                                </div>
                            </fieldset>
                        </form:form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="<%=path%>/assets/js/plugins.min.js"></script>
<script src="<%=path%>/assets/js/app.min.js"></script>
<script src="<%=path%>/assets/js/configurator.min.js"></script>
<script>
    (function (i, s, o, g, r, a, m) {
        i['GoogleAnalyticsObject'] = r;
        i[r] = i[r] || function () {
                (i[r].q = i[r].q || []).push(arguments)
            }, i[r].l = 1 * new Date();
        a = s.createElement(o),
            m = s.getElementsByTagName(o)[0];
        a.async = 1;
        a.src = g;
        m.parentNode.insertBefore(a, m)
    })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
    ga('create', 'UA-90917746-2', 'auto');
    ga('send', 'pageview');
</script>
</body>
</html>
